package com.air;

/**
 * User: Aruna Rajapaksha
 */

public class AuthenticationModel {
    public String doAuthenticate(String userName, String password) {

        String status;

        if (userName == null || password == null) {
            status = "ERROR";
        } else if (userName.equalsIgnoreCase("Aruna") && password.equalsIgnoreCase("abc123$")) {
            status = "OK";
        } else {
            status = "NO";
        }

        try {
            Thread.sleep(300);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return (status);
    }
}